package test.day03;

import java.util.Scanner;

public class test03 {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();

        //  ||从左到右判断，如果能满足条件，则后边的不运行
        boolean result = num1 == 6 || num2 == 6 || (num1 + num2) % 6 == 0;
        System.out.println(result);
        //  最大值判断
        int max = num1 > num2 ? num1 : num2;
        System.out.println(max);

    }
}
